package db

type Factory func() TableMeta

var gFactoryMap = make(map[string]Factory)

func registerFactory(f Factory) {
	m := f()
	key := m.BaseTableName()
	if _, ok := gFactoryMap[key]; ok {
		_gDBLogger.Fatal("db register meta factory error").Println()
	}
	gFactoryMap[key] = f
}
